<template>
  <view class="pay_success">
    <view class="header">
      <image src="@/assets/images/index/img_chenggong.png"></image>
      <view class="h2">恭喜您，支付成功</view>
      <view class="h3">感谢您对盛辉物流的支持~</view>
    </view>
    <view class="bg">
      <view class="one_btn"  @click="onceAgin()">继续下单</view>
      <view class="tow_btn" @click="look()">查看订单</view>
    </view>
  </view>
</template>
<script lang="ts" setup>
import Taro from '@tarojs/taro';
import { reset } from '../sendGoods/reset';
import useMyOrderStore from "@/store/myOrder";
import {$post} from "@/@api";
const order = useMyOrderStore();
const look = async ()=>{
  let res: any = await $post(
      "/selfmachine-system/order/list",
      {
        billNo: order.payList[0].billNo,
      }
  )
  order.orderList = res.data.rows[0]
  Taro.navigateTo({
    url: "/pages/myOrder/order",
  })
}
function onceAgin() {
    reset()
  Taro.navigateTo({
    url: "/pages/sendGoods/index",
  });
}
</script>
<style lang="scss">
.pay_success {
  height: 100vh;
  width: 100vw;
  .header {
    width: 100%;
    height: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    image {
      width: 280rpx;
      height: 280rpx;
    }
    .h2 {
      font-family: PingFang SC;
      font-size: 40rpx;
      font-weight: 700;
      color: #252525;
      margin-top: 24rpx;
    }
    .h3 {
      font-family: PingFang SC;
      font-size: 28rpx;
      color: #999999;
    }
  }
  .bg {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    .one_btn {
      width: 590rpx;
      height: 88rpx;
      border-radius: 88rpx;
      font-size: 32rpx;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #FFFFFF;

      background: #0966ff;
      margin-bottom: 24rpx;
    }
    .tow_btn {
        width: 590rpx;
      height: 88rpx;
      border-radius: 88rpx;
      font-size: 32rpx;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid #C4C4C4;
    }
  }
}
</style>
